package com.googlecode.struts2scope.context;

import java.util.Map;

public class ContextImpl implements Context {

	private Map<String, Object> originalContext;

	public ContextImpl(Map<String, Object> session) {
		this.originalContext = session;
	}
	
	public Object getAttribute(String name) {
		return originalContext.get(name);
	}

	public boolean hasAttribute(String name) {
		return originalContext.containsKey(name);
	}

	public Object removeAttribute(String name) {
		return originalContext.get(name);
	}

	public void setAttribute(String name, Object value) {
		originalContext.put(name, value);
	}

}
